<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>XYChart.getYCoor</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="XYChart.htm">XYChart</a>.<wbr>getYCoor</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public int getYCoor(double v [, Axis yAxis ])
</div>
<p class="heading2">Description</p>
<div class="content">
Gets the y pixel coordinate given the y data value.<br><br>
This method only accepts numeric values as input. If the axis scale is a date/time scale, and you are using a java.util.Date value, please use <a href="Chart.CTime.htm">Chart.CTime</a> to convert it to a number.<br><br>
<b>Note:</b> This method should be used only after ChartDirector has output the chart image, or after <a href="XYChart.layoutAxes.htm">XYChart.layoutAxes</a>, <a href="BaseChart.layout.htm">BaseChart.layout</a> or <a href="XYChart.packPlotArea.htm">XYChart.packPlotArea</a> has been called. ChartDirector needs to perform auto- scaling and layout the axis before it can convert between pixel coordinates and data values.<br><br>
For an XYChart with 3D layers, this method will get the pixel coordinate of the data value on the top layer of the chart. Use <a href="Layer.getYCoor.htm">Layer.getYCoor</a> to obtain the pixel coordinate of the data value on a particular chart layer.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>v</td><td>(Mandatory)</td><td>The y data value.</td></tr><tr><td>yAxis</td><td>[Null]</td><td>The y-axis to use to determine the pixel coordinates of data values. The y-axis may be obtained using <a href="XYChart.yAxis.htm">XYChart.yAxis</a>, <a href="XYChart.yAxis2.htm">XYChart.yAxis2</a> or <a href="XYChart.addAxis.htm">XYChart.addAxis</a>. The default is to use the primary y-axis.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
The y pixel coordinate of the y data value.
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
